import http from './index'

export function level(id) {
  return ['', 'province', 'city', 'county', 'town'][id]
} 

export function list(params) {
  return http.get('/market/goods', { 
    params
  })
}

export function trade(data) { 
  return http.post('/market/order/confirm', { data })
}

export function cancel(data) { 
  return http.post('/market/goods/cancel', { data })
}

export function push(data) {
  return http.post('/market/goods/push', { data })
}